#ifndef _INHERITANCE_HEADER
#define _INHERITANCE_HEADER

class CBase{
	int _private;
protected:
	int _protected;
public:
	int _public;
	CBase(){}
	CBase(int _pri, int _pro, int _pub) : _private(_pri), _protected(_pro), _public(_pub){}

	void f(){}
};

class CDerived : private CBase{ // public CBase
public:
	CDerived(){
		// this->_private = 1; // Error: cannot access private member declared in class 'CBase'
		this->_protected = 3;
		this->_public = 7;
		// CBase::_private = 0; // Error: cannot access private member declared in class 'CBase'
		CBase::_protected = 2;
		CBase::_public = 4;
	}

	CDerived(CBase &cBase){
		// cBase._private = 1; // Error: cannot access private member declared in class 'CBase'
		// cBase._protected = 3; // Error: cannot access protected member declared in class 'CBase'
		cBase._public = 7;
	}

	CDerived(CDerived &cDerived){
		// cDerived._private = 1; // Error: cannot access private member declared in class 'CBase'
		cDerived._protected = 3;
		cDerived._public = 7;
	}
	
	// Error C2614: 'CDerived' : illegal member initialization: '_public', '_protected', '_private' is not a base or member
	// CDerived(int _pri, int _pro, int _pub) : _private(_pri), _protected(_pro), _public(_pub){}

	CDerived(int _pri, int _pro, int _pub) : CBase(_pri, _pro, _pub){}

	void f(int){}
};

#endif // _INHERITANCE_HEADER